import { BasePlugin } from "./BasePlugin";
import { ShellUtil } from "../util/ShellUtil";
import { Main } from "../Main";

export class SyncMiscInfoPhp extends BasePlugin {
    getName(): string {
        return "同步miscinfo.php"
    }
    getDesc(): string {
        return "所有平台的miscinfo.php文件都应该从publishclient根目录同步而来。也就是整个项目只有一份该文件 ./cs.sh SyncMiscInfoPhp 平台名 debug|release"
    }
    do(args: string[], cb:()=>void): void {
        ShellUtil.exec(`
            cp ${Main.projPath}publishclient/miscinfo.php ${Main.projPath}publishclient/${args[0]}/${args[1]}/miscinfo.php 
        `, ()=>{
            console.log("sync miscinfo.php ok");
            cb();
        })
    }


}